import msvcrt
import serial
ser = serial.Serial('COM1',57600)
getch = msvcrt.getch

while True:
	ch = getch()
	if ch == 't':
		print "TX1"
		ser.write("TX1;")
	elif ch == 'r':
		print "RX"
		ser.write("RX;")
	elif ch == 'x':
		print "Exiting..."
		break